package com.job.GaoYuXuan.Homework0709;

import java.util.Scanner;

/**
 * @author 盖
 * @version 1.0
 * @since 2022-07-10 12:48:26
 */
public class Text {
    public static void main(String[] args) {
        Computer demo1 = null;
        Scanner input = new Scanner(System.in);
        String whether;
        System.out.println("请问你选择什么样子的电脑：（选择序号）");
        System.out.println("1.游戏电脑");
        System.out.println("2.办公电脑");
        System.out.println("3.轻薄电脑");
        whether = input.next();
        if ("1".equals(whether)){
            demo1 = new GameComputer();
            demo1.function();
            GameComputer gamedemo = (GameComputer) demo1;
            gamedemo.graphicsCard = "RTX A6000";
            gamedemo.RAM = "8 GB";
            System.out.println("显卡：" + gamedemo.graphicsCard);
            System.out.println("运行内存：" + gamedemo.RAM);
        }else if ("2".equals(whether)){
            demo1 = new OfficeComputer();
            demo1.function();
            OfficeComputer officedemo = (OfficeComputer) demo1;
            officedemo.setExcel("1.8");
            officedemo.setWord("1.9");
            System.out.println("excel版本：" + officedemo.getExcel());
            System.out.println("word版本：" + officedemo.getWord());
        }else if ("3".equals(whether)){
            demo1 = new ThinComputer();
            demo1.function();
        }else{
            System.out.println("无此种类型电脑！！！");
        }
    }
}